test: Avoid APFS integration timeout - #2452
Merged
Merged
Conversation
shepilov
marked this pull request as ready for review
July 7, 2026 12:15
taratatach
reviewed
Jul 8, 2026
shepilov
commented
Jul 9, 2026
shepilov
commented
Jul 9, 2026
shepilov
force-pushed
the
fix/apfs-integration-timeout
branch
2 times, most recently
from
July 9, 2026 14:30
999233c to
60a10d1
Compare
Fix local watcher wait races in integration tests by registering local-end waits before writes and by avoiding a redundant wait after side startup.
shepilov
force-pushed
the
fix/apfs-integration-timeout
branch
from
July 10, 2026 07:55
60a10d1 to
0dfa6f8
Compare
taratatach
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial problem
The APFS integration job was timing out in
test/integration/differential_sync.jsfor the scenario where a local folder is created with the same path as an excluded remote folder and the user chooses to create a conflict. The failing test waited forlocal-endonly afterhelpers.local.side.start()had resolved, butstart()already waits for the initial scan to finish. The watcher emitslocal-endbefore resolving thatstart()promise, so the test could attach its listener too late and then wait forever until Mocha hit the 20s timeout.The same race also existed after creating
Photos/andPhotos/My Image.png: the listener was registered after the filesystem writes, so a fast watcher could flush the events before the test started waiting.Changes
local-endwait afterhelpers.local.side.start().once('local-end', ...)listener.Validation
./node_modules/.bin/eslint test/integration/differential_sync.jsgit diff --check origin/master...HEADThe targeted APFS integration test was not run locally because this checkout has no
.env.test, and no local Cozy stack is running oncozy.localhost:8080/127.0.0.1:8080.